<template>
  <div id="order-group-box" v-if="detail.id>0">
    <div class="custom-table custom-table-2">
      <div class="row">
        <div class="left">订单编号:</div>
        <div class="right" v-text="detail.orderNo"></div>
        <div class="c"></div>
      </div>
      <div class="row">
        <div class="left">拼团状态:</div>
        <div class="right" v-text="detail.status.name"></div>
        <div class="c"></div>
      </div>
      <div class="row">
        <div class="left">拼团人数:</div>
        <div class="right" v-text="detail.groupNums"></div>
        <div class="c"></div>
      </div>
      <div class="row">
        <div class="left">当前人数:</div>
        <div class="right" v-text="detail.currNums"></div>
        <div class="c"></div>
      </div>
      <div class="row">
        <div class="left">拼团时间:</div>
        <div class="right" v-text="detail.createdTime"></div>
        <div class="c"></div>
      </div>
      <div class="row">
        <div class="left">拼团结束时间:</div>
        <div class="right" v-text="detail.endTime"></div>
        <div class="c"></div>
      </div>
      <div class="c"></div>
    </div>

    <div class="custom-table">
      <div class="row">
        <div class="left">拼团商品:</div>
        <div class="right">
          <product-item :curr-product="{
              id:detail.productId,
              name:detail.productName,
              image:detail.productImage,
              price:detail.productPrice,
              model:detail.productModel,
              nums:1
            }"/>
        </div>
        <div class="c"></div>
      </div>
      <div class="c"></div>
    </div>

    <div class="custom-table">
      <div class="row">
        <div class="left">参团列表:</div>
        <div class="right">
          <member-item :key="index" v-for="(member,index) in detail.joinOrderData" :curr-member="{
                icon:member.memberIcon,
                nickname:member.memberNickname,
              }"/>
        </div>
        <div class="c"></div>
      </div>
      <div class="c"></div>
    </div>
  </div>
</template>

<script>
import ProductItem from './ProductItem'
import MemberItem from './MemberItem'
export default {
  name: 'OrderGroupBox',
  components: {MemberItem, ProductItem},
  props:{
    detail:Object
  },
}
</script>

<style scoped>

</style>
